package com.aloda.utils;

import java.util.regex.Pattern;

public class PasswordUtils {

    public static boolean checkPassword(String password) {
        // 校验密码
        Pattern passwordPattern = Pattern.compile("^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d\\S]{6,16}$");
        return password != null
                && !password.isEmpty()
                && passwordPattern.matcher(password).matches();
    }
}
